// import request from '@/utils/request'
export function getMapLocation () {
  return new Promise(function (resolve, reject) {
    window.onload = function () {
      resolve(BMap)
    }
    var script = document.createElement('script')
    script.type = 'text/javascript'
    script.src = 'http://api.map.baidu.com/api?v=3.0&ak=Wcpvydx0KP1EySuTI0uTlDx7MEi7dCY1' + '&callback=init'
    script.onerror = reject
    document.head.appendChild(script)
  })
}
